Integrand size = 29, antiderivative size = 170 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {1}{8} \left (8 a A b+4 a^2 B+3 b^2 B\right ) x+\frac {\left (4 a^2 A b+4 A b^3-a^3 B+8 a b^2 B\right ) \sin (c+d x)}{6 b d}+\frac {\left (8 a A b-2 a^2 B+9 b^2 B\right ) \cos (c+d x) \sin (c+d x)}{24 d}+\frac {(4 A b-a B) (a+b \cos (c+d x))^2 \sin (c+d x)}{12 b d}+\frac {B (a+b \cos (c+d x))^3 \sin (c+d x)}{4 b d} \]
1/8*(8*A*a*b+4*B*a^2+3*B*b^2)*x+1/6*(4*A*a^2*b+4*A*b^3-B*a^3+8*B*a*b^2)*si n(d*x+c)/b/d+1/24*(8*A*a*b-2*B*a^2+9*B*b^2)*cos(d*x+c)*sin(d*x+c)/d+1/12*( 4*A*b-B*a)*(a+b*cos(d*x+c))^2*sin(d*x+c)/b/d+1/4*B*(a+b*cos(d*x+c))^3*sin( d*x+c)/b/d
Time = 1.64 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.69 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {12 \left (8 a A b+4 a^2 B+3 b^2 B\right ) (c+d x)+24 \left (4 a^2 A+3 A b^2+6 a b B\right ) \sin (c+d x)+24 \left (2 a A b+a^2 B+b^2 B\right ) \sin (2 (c+d x))+8 b (A b+2 a B) \sin (3 (c+d x))+3 b^2 B \sin (4 (c+d x))}{96 d} \]
(12*(8*a*A*b + 4*a^2*B + 3*b^2*B)*(c + d*x) + 24*(4*a^2*A + 3*A*b^2 + 6*a* b*B)*Sin[c + d*x] + 24*(2*a*A*b + a^2*B + b^2*B)*Sin[2*(c + d*x)] + 8*b*(A *b + 2*a*B)*Sin[3*(c + d*x)] + 3*b^2*B*Sin[4*(c + d*x)])/(96*d)
Time = 0.64 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {3042, 3447, 3042, 3502, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int (a+b \cos (c+d x))^2 \left (A \cos (c+d x)+B \cos ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (A \sin \left (c+d x+\frac {\pi }{2}\right )+B \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\int (a+b \cos (c+d x))^2 (3 b B+(4 A b-a B) \cos (c+d x))dx}{4 b}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (3 b B+(4 A b-a B) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{4 b}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{3} \int (a+b \cos (c+d x)) \left (b (8 A b+7 a B)+\left (-2 B a^2+8 A b a+9 b^2 B\right ) \cos (c+d x)\right )dx+\frac {(4 A b-a B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}}{4 b}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (b (8 A b+7 a B)+\left (-2 B a^2+8 A b a+9 b^2 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(4 A b-a B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}}{4 b}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {b \left (-2 a^2 B+8 a A b+9 b^2 B\right ) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3}{2} b x \left (4 a^2 B+8 a A b+3 b^2 B\right )+\frac {2 \left (a^3 (-B)+4 a^2 A b+8 a b^2 B+4 A b^3\right ) \sin (c+d x)}{d}\right )+\frac {(4 A b-a B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}}{4 b}+\frac {B \sin (c+d x) (a+b \cos (c+d x))^3}{4 b d}\) |
(B*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*b*d) + (((4*A*b - a*B)*(a + b*C os[c + d*x])^2*Sin[c + d*x])/(3*d) + ((3*b*(8*a*A*b + 4*a^2*B + 3*b^2*B)*x )/2 + (2*(4*a^2*A*b + 4*A*b^3 - a^3*B + 8*a*b^2*B)*Sin[c + d*x])/d + (b*(8 *a*A*b - 2*a^2*B + 9*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(2*d))/3)/(4*b)
3.3.24.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 2.76 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.69
method | result | size |
parallelrisch | \(\frac {24 \left (2 A a b +B \,a^{2}+B \,b^{2}\right ) \sin \left (2 d x +2 c \right )+8 \left (A \,b^{2}+2 B a b \right ) \sin \left (3 d x +3 c \right )+3 B \,b^{2} \sin \left (4 d x +4 c \right )+24 \left (4 A \,a^{2}+3 A \,b^{2}+6 B a b \right ) \sin \left (d x +c \right )+96 x \left (A a b +\frac {1}{2} B \,a^{2}+\frac {3}{8} B \,b^{2}\right ) d}{96 d}\) | \(118\) |
parts | \(\frac {\left (A \,b^{2}+2 B a b \right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (2 A a b +B \,a^{2}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\sin \left (d x +c \right ) A \,a^{2}}{d}+\frac {B \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(126\) |
derivativedivides | \(\frac {B \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {2 B a b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 A a b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,a^{2} \sin \left (d x +c \right )}{d}\) | \(152\) |
default | \(\frac {B \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {2 B a b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 A a b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,a^{2} \sin \left (d x +c \right )}{d}\) | \(152\) |
risch | \(x A a b +\frac {a^{2} B x}{2}+\frac {3 b^{2} B x}{8}+\frac {\sin \left (d x +c \right ) A \,a^{2}}{d}+\frac {3 \sin \left (d x +c \right ) A \,b^{2}}{4 d}+\frac {3 \sin \left (d x +c \right ) B a b}{2 d}+\frac {B \,b^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) A \,b^{2}}{12 d}+\frac {\sin \left (3 d x +3 c \right ) B a b}{6 d}+\frac {\sin \left (2 d x +2 c \right ) A a b}{2 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{2}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B \,b^{2}}{4 d}\) | \(170\) |
norman | \(\frac {\left (A a b +\frac {1}{2} B \,a^{2}+\frac {3}{8} B \,b^{2}\right ) x +\left (A a b +\frac {1}{2} B \,a^{2}+\frac {3}{8} B \,b^{2}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (4 A a b +2 B \,a^{2}+\frac {3}{2} B \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (4 A a b +2 B \,a^{2}+\frac {3}{2} B \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6 A a b +3 B \,a^{2}+\frac {9}{4} B \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (8 A \,a^{2}-8 A a b +8 A \,b^{2}-4 B \,a^{2}+16 B a b -5 B \,b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (8 A \,a^{2}+8 A a b +8 A \,b^{2}+4 B \,a^{2}+16 B a b +5 B \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (72 A \,a^{2}-24 A a b +40 A \,b^{2}-12 B \,a^{2}+80 B a b +9 B \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {\left (72 A \,a^{2}+24 A a b +40 A \,b^{2}+12 B \,a^{2}+80 B a b -9 B \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(362\) |
1/96*(24*(2*A*a*b+B*a^2+B*b^2)*sin(2*d*x+2*c)+8*(A*b^2+2*B*a*b)*sin(3*d*x+ 3*c)+3*B*b^2*sin(4*d*x+4*c)+24*(4*A*a^2+3*A*b^2+6*B*a*b)*sin(d*x+c)+96*x*( A*a*b+1/2*B*a^2+3/8*B*b^2)*d)/d
Time = 0.30 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.67 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {3 \, {\left (4 \, B a^{2} + 8 \, A a b + 3 \, B b^{2}\right )} d x + {\left (6 \, B b^{2} \cos \left (d x + c\right )^{3} + 24 \, A a^{2} + 32 \, B a b + 16 \, A b^{2} + 8 \, {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (4 \, B a^{2} + 8 \, A a b + 3 \, B b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
1/24*(3*(4*B*a^2 + 8*A*a*b + 3*B*b^2)*d*x + (6*B*b^2*cos(d*x + c)^3 + 24*A *a^2 + 32*B*a*b + 16*A*b^2 + 8*(2*B*a*b + A*b^2)*cos(d*x + c)^2 + 3*(4*B*a ^2 + 8*A*a*b + 3*B*b^2)*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 338 vs. \(2 (162) = 324\).
Time = 0.20 (sec) , antiderivative size = 338, normalized size of antiderivative = 1.99 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\begin {cases} \frac {A a^{2} \sin {\left (c + d x \right )}}{d} + A a b x \sin ^{2}{\left (c + d x \right )} + A a b x \cos ^{2}{\left (c + d x \right )} + \frac {A a b \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} + \frac {2 A b^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A b^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {B a^{2} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {B a^{2} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {B a^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {4 B a b \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {2 B a b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 B b^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 B b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 B b^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 B b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 B b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\left (c \right )}\right ) \left (a + b \cos {\left (c \right )}\right )^{2} \cos {\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((A*a**2*sin(c + d*x)/d + A*a*b*x*sin(c + d*x)**2 + A*a*b*x*cos(c + d*x)**2 + A*a*b*sin(c + d*x)*cos(c + d*x)/d + 2*A*b**2*sin(c + d*x)**3/ (3*d) + A*b**2*sin(c + d*x)*cos(c + d*x)**2/d + B*a**2*x*sin(c + d*x)**2/2 + B*a**2*x*cos(c + d*x)**2/2 + B*a**2*sin(c + d*x)*cos(c + d*x)/(2*d) + 4 *B*a*b*sin(c + d*x)**3/(3*d) + 2*B*a*b*sin(c + d*x)*cos(c + d*x)**2/d + 3* B*b**2*x*sin(c + d*x)**4/8 + 3*B*b**2*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + 3*B*b**2*x*cos(c + d*x)**4/8 + 3*B*b**2*sin(c + d*x)**3*cos(c + d*x)/(8* d) + 5*B*b**2*sin(c + d*x)*cos(c + d*x)**3/(8*d), Ne(d, 0)), (x*(A + B*cos (c))*(a + b*cos(c))**2*cos(c), True))
Time = 0.19 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.84 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 48 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a b - 64 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a b - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A b^{2} + 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{2} + 96 \, A a^{2} \sin \left (d x + c\right )}{96 \, d} \]
1/96*(24*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^2 + 48*(2*d*x + 2*c + sin(2* d*x + 2*c))*A*a*b - 64*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a*b - 32*(sin(d *x + c)^3 - 3*sin(d*x + c))*A*b^2 + 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B*b^2 + 96*A*a^2*sin(d*x + c))/d
Time = 0.29 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.73 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {B b^{2} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {1}{8} \, {\left (4 \, B a^{2} + 8 \, A a b + 3 \, B b^{2}\right )} x + \frac {{\left (2 \, B a b + A b^{2}\right )} \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {{\left (B a^{2} + 2 \, A a b + B b^{2}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (4 \, A a^{2} + 6 \, B a b + 3 \, A b^{2}\right )} \sin \left (d x + c\right )}{4 \, d} \]
1/32*B*b^2*sin(4*d*x + 4*c)/d + 1/8*(4*B*a^2 + 8*A*a*b + 3*B*b^2)*x + 1/12 *(2*B*a*b + A*b^2)*sin(3*d*x + 3*c)/d + 1/4*(B*a^2 + 2*A*a*b + B*b^2)*sin( 2*d*x + 2*c)/d + 1/4*(4*A*a^2 + 6*B*a*b + 3*A*b^2)*sin(d*x + c)/d
Time = 0.53 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.99 \[ \int \cos (c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx=\frac {B\,a^2\,x}{2}+\frac {3\,B\,b^2\,x}{8}+\frac {A\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {3\,A\,b^2\,\sin \left (c+d\,x\right )}{4\,d}+A\,a\,b\,x+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {A\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a\,b\,\sin \left (c+d\,x\right )}{2\,d}+\frac {A\,a\,b\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {B\,a\,b\,\sin \left (3\,c+3\,d\,x\right )}{6\,d} \]
(B*a^2*x)/2 + (3*B*b^2*x)/8 + (A*a^2*sin(c + d*x))/d + (3*A*b^2*sin(c + d* x))/(4*d) + A*a*b*x + (B*a^2*sin(2*c + 2*d*x))/(4*d) + (A*b^2*sin(3*c + 3* d*x))/(12*d) + (B*b^2*sin(2*c + 2*d*x))/(4*d) + (B*b^2*sin(4*c + 4*d*x))/( 32*d) + (3*B*a*b*sin(c + d*x))/(2*d) + (A*a*b*sin(2*c + 2*d*x))/(2*d) + (B *a*b*sin(3*c + 3*d*x))/(6*d)